﻿namespace System
{
	public static class StringExtensions
	{
		public static string Limit(this string text, int maxLength)
		{
			string returnValue = string.Empty;

			if (text.Length > maxLength)
			{
				returnValue = text.Substring(0, maxLength);
			}
			else
			{
				returnValue = text;
			}

			return returnValue;
		}
	}
}
